import request from '@/utils/request'

// 查询预警规则配置列表
export function listRuleConfig(query) {
  return request({
    url: '/ai/ruleConfig/list',
    method: 'get',
    params: query
  })
}

// 查询预警规则配置详细
export function getRuleConfig(ruleId) {
  return request({
    url: '/ai/ruleConfig/' + ruleId,
    method: 'get'
  })
}

// 新增预警规则配置
export function addRuleConfig(data) {
  return request({
    url: '/ai/ruleConfig',
    method: 'post',
    data: data
  })
}

// 修改预警规则配置
export function updateRuleConfig(data) {
  return request({
    url: '/ai/ruleConfig',
    method: 'put',
    data: data
  })
}

// 删除预警规则配置
export function delRuleConfig(ruleId) {
  return request({
    url: '/ai/ruleConfig/' + ruleId,
    method: 'delete'
  })
}
